Skip to content

Teams: no "Copy link" for a message, chat or channel; Teams links do not open here - #830

Closed
itz4blitz wants to merge 1 commit into
mainfrom
issue/641-teams-copy-link
Closed

itz4blitz wants to merge 1 commit into
mainfrom
issue/641-teams-copy-link

Conversation

@itz4blitz

Copy link
Copy Markdown
Collaborator

What changed and why

A Teams chat or channel now has a copyable link in the info pane, using Microsoft's documented https://teams.microsoft.com/l/… forms. A channel message link uses the same form, and a reply includes its post as parentMessageId. Those addresses parse back to the chat, channel, message or team, including the msteams: form. A link that starts a new chat, or that is not a Teams link, is left alone.

The message menu's Copy link, opening a Teams link inside the app, and a link on a team in the space list stay with the shell. This change fills the conversation link the info pane already shows, and builds the message and team addresses the adapter can name.

Type

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/teams-copy-link

Lab run: not run

Compatibility

No protocol field was added. ConversationInfo.link was already there and was empty for Teams. An older client still ignores a link it does not show. An older chatd ignores TINYCLIENT_PROVE=teams-copy-link and keeps serving, so the scenario fails on that build.

Risk and rollback

A wrong link would open the wrong place in the official Teams app when someone copies it. Revert this change.

Release note

A Teams chat or channel can be copied as a link that opens that place in Teams.

How tested

cargo test -p chatd --no-default-features for the new link round trip, for a channel page's existing message link, and for the info pane of a channel and a group chat. cargo clippy -p chatd --no-default-features --all-targets is clean.

What was not tested

A live Teams tenant. The lab has not recorded e2e/scenarios/teams-copy-link. The message menu, opening a link inside the app, and a team link in the space list were left as they are.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Tiny Code Review

⚠️ Code review unavailable · run

the AI provider rate-limited the request

This is advice, not a gate. Re-run with the agent:review label or a /review comment.

@unRekable unRekable left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

🟢 No findings.

The change fills the existing, optional ConversationInfo.link for Teams using Microsoft's documented deep-link forms, and reworks message_link to take the placed channel from the message payload and name a reply's post as parentMessageId. The design holds: share_link mirrors the pre-existing call_link pattern in the same adapter (same group:{team} note lookup, same escaped()), no protocol field changes (ConversationInfo.link already has serde(default) and is skipped when empty), and nothing new is fetched or opened by chatd. parse_share is groundwork with no production caller yet, but it is exercised by a round-trip unit test, the prove driver and the e2e scenario, and no defect was found in the diff.

Residual risk

  • parse_share, ShareTarget and team_share have no caller outside tests and the prove driver; the 'a Teams link opens here' half of the title lands with a later change, and the parse input should then get the same cap treatment the rest of the wire has.
  • The exact query parameters (ngc=true, allowXTenantAccess=true, parentMessageId, the meetup-join form) are taken from Microsoft's docs and are unverified against a live tenant; a wrong form sends a copied link to the wrong place, which the PR body itself names as the risk.
  • Message::bound clips forwarded.link but not MessageKind::Unsupported.link; the diff sources more of that link from the message's conversationLink (a value that already flows through the read path on main), so a hostile tenant could make it long until a clip exists.

The info pane copies Microsoft's documented form for a chat and a channel. A message link uses the same form, and a reply names its post. Each link parses back to the place it came from.

Closes #641
@itz4blitz

Copy link
Copy Markdown
Collaborator Author

Superseded by and merged in #903 (d387971 — Release 2026-11-20 combined PR).

@itz4blitz itz4blitz closed this Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants